﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Admin_Cache.aspx.cs"
     Inherits="Xiaov.SmartWeb.Application.SysAdmin.Admin_Cache" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="/Resources/xiaovcn/scripts/usercheck.js"></script>

    <script type="text/javascript">    
        $(function () {
            $('#tt').datagrid({
                onDblClickRow: function (index, field, value) {
                    var row = $('#tt').datagrid('getSelected');
                    del(row.Name);
                }
            });
        });
        var toolbar = [{  
            text:'清空所有缓存',  
            iconCls: 'icon-reload',
            handler: function () {
                del();
            }
           }]
        function callback(res) {
            $.messager.alert('提示', '操作成功！');
            $('#tt').datagrid('reload');
        }

        function del(key)
        {
            Xiaov.SmartWeb.Application.SysAdmin.Admin_Cache.ClearCache(key, callback);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">     
    <table id="tt" class="easyui-datagrid" title="缓存项目列表"
			data-options="singleSelect:true,collapsible:false,url:'Json/Cache.aspx',toolbar:toolbar,rownumbers:true,nowrap: true, remoteSort: false"">
		<thead>
			<tr>
				<th data-options="field:'Name',width:280,sortable: true">缓存名称</th>
				<th data-options="field:'Value',width:500,sortable: true">值</th>
			</tr>
		</thead>
	</table>
    <script>
        $('#tt').css('height', userScreenHeight + 20);
    </script>
</asp:Content>
